package com.example.word.mapper;

import com.example.word.dto.CompRecordDTO;
import com.example.word.dto.TemplateDetailDTO;
import com.example.word.dto.TemplateRecordDTO;
import com.example.word.pojo.CompRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.word.vo.ConditionVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Entity com.example.word.pojo.CompRecord
 */
@Repository
public interface CompRecordMapper extends BaseMapper<CompRecord> {

    List<CompRecordDTO> listRecordsByUId(Integer id, @Param("current") Long current, @Param("size") Long size, @Param("condition") ConditionVO condition);

    List<TemplateRecordDTO> listRecordsCountByTId(Integer id,@Param("current") Long current, @Param("size") Long size, @Param("condition") ConditionVO condition);

    Integer selectCountById(Integer id);

    List<TemplateDetailDTO> listRecordsByTmpId(Integer id,@Param("current") Long current, @Param("size") Long size, @Param("condition") ConditionVO condition);
    //根据老师id去查模板对比记录，同一个用户的算一个
    Integer listCountByTId(Integer id);
}




